package bbs.entity.enums;

public enum AttachmentFileTypeEnum {

    ZIP(0, "压缩包", new String[]{".zip", ".rar"});

    private Integer type;
    private String desc;
    private String[] suffix;

    public static AttachmentFileTypeEnum getEnum(Integer type) {
        for (AttachmentFileTypeEnum e : AttachmentFileTypeEnum.values()) {
            if (e.getType().equals(type)) {
                return e;
            }
        }
        return null;
    }
    public Integer getType() {
        return type;
    }
    public String getDesc() {
        return desc;
    }
    public String[] getSuffix() {
        return suffix;
    }

    private AttachmentFileTypeEnum(Integer type, String desc, String[] suffix) {
        this.type = type;
        this.desc = desc;
        this.suffix = suffix;
    }
}
